<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .haha{
            width: 300px;
            height: 160px;
            background-color: #ffa19d;
        }
    </style>
</head>
<body>
<div id="app">
    <button @click="flag=!flag">点我切换</button>

    <div :class="{haha:flag}">
        显示样式
    </div>
    <div :class="{haha:!flag}">
        yyyy
    </div>
</div>

<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    let vue = new Vue({
        el: "#app",
        data:{
            flag:false
        }

    });
</script>
</body>
</html>